﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DiagrammInternalStructure
{
    public class FunctionSignature:IComparable
    {
        private List<FunctionParameter> m_parameters = new List<FunctionParameter>();
        private static FunctionSignature m_empty = new FunctionSignature();


        public FunctionSignature()
        { 
        
        }

        public int CompareTo(object obj)
        {
            FunctionSignature sign = (obj as FunctionSignature);
            if (sign.m_parameters.Count != this.m_parameters.Count)
            {
                return 0;
            }
            for (int i = 0; i<sign.m_parameters.Count; ++i)
            {
                if (m_parameters[i].CompareTo(sign.m_parameters[i]) == 0)
                {
                    return 0;
                }
            }
            return 1;
        }

        public static FunctionSignature Empty
        {
            get
            {
                return m_empty;
            }
        }
    }
}
